﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class VendedoresFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As VendedoresBE
        Dim tmpVendedores As VendedoresBE = New VendedoresBE()
        Try
            With tmpVendedores
                .IdEmpresa = convertDTFromDb.convertInt32(dr.Item("IdEmpresa"))
                .IdVendedor = convertDTFromDb.ConvertLong(dr.Item("IdVendedor"))
                .Nombre = convertDTFromDb.ConvertString(dr.Item("Nombre"))
                .Porc = convertDTFromDb.ConvertDecimal(dr.Item("Porc"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
            End With
            Return tmpVendedores
        Catch ex As Exception
            Throw
        Finally
            tmpVendedores = Nothing
        End Try
    End Function
End Class
